@import "../../../style/utils";

// book组件是否展开由user组件的状态决定，见user/style.scss
.panel{
    width: calc(100% - 290px);
    height: 100%;
    padding: 0 30px;
    transform: translateX(290px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    transition: transform .52s cubic-bezier(0.0,0.0,0.2,1);
    margin: auto;
}

// 小屏幕不变换
@include mqsmall( '.panel', (
    width: 100%,
    padding: 0 15px,
    transform: translateX(0px)
));

.book{
    width: 214px;
    display: inline-block;
    border: 1px solid #e1e8ed;
    border-radius: 2px;
    margin: 10px 5px 0 5px;
}

@include mqfromto( '.book', '701px', '200px', (
    position: relative,
    display: block,
    width: 100%,
    height: 115px,
    margin: 0 0 10px 0,
    padding: 4px
))

.image{
    padding: 4px 0;
    margin: 6px;
    height: 200px;
    text-align: center;
    border: 2px solid #e1e8ed;
    border-radius: 2px;
    img{
        height: 100%;
        max-width: 100%;
    }
}

@include mqfromto( '.image', '701px', '200px', (
    padding: 0,
    margin: 0,
    float: left,
    height: 105px,
    width: 85px,
    margin-right: 6px
))

.loadingTip{
  position: relative;
  width: 55%;
  margin: auto;
  padding-bottom: 15px;
	span{
		display: inline-block;
    text-align: center;
    font-family: 微软雅黑;
    color: gray;
    margin-left: 14%;
    visibility: visible;
  }
	.loading{
		position: absolute;
		right: 90%;
		top: 3px;
	  visibility: visible;
	  animation: loading 0.8s linear infinite;
	}   
  &[data-isshow="false"]{
  	display: none;
  }     
}

.turntop{
  border-radius: 50%;
  font-size: 30px;
  font-family: 微软雅黑;
  width: 40px;
  height: 40px;
  position: fixed;
  right: 15px;
  bottom: 10px;
  border: 2px solid;
  text-align: center;
  opacity: 0.4;
  line-height: 35px;
  color: gray;
  background: lightgray;
  &[data-isshow="false"]{
    visibility: hidden;
  }  
}

.searchtip{
  border: 1px solid lightgray;
  border-radius: 5px;
  width: 90%;
  margin: auto;
  padding: 10px 0px;
  padding-left: 5px;
  margin-top: 10px;
  &[data-isshow="false"]{
    display: none;
  }    
}

.search{
  position: relative;
  margin-bottom: 15px;
	span{
    font-size: xx-large;
    font-family: 微软雅黑;
    font-weight: bold;
    text-align: center;
    width: 100%;
    display: block;
    padding-top: 5px;
    padding-bottom: 20px;
	}
	input{
		border: 1px solid lightgray;
    display: block;
    border-radius: 5px;
    height: 40px;
    margin: 0px auto;
    width: 90%;
		font-size: large;
		font-family: 微软雅黑;    
		padding-left: 5px;
	}
	.loading{
		position: absolute;
		right: 7%;
		top: 80px;
    visibility: visible;
    animation: loading 0.8s linear infinite;
  }
	p{
    position: relative;
    display: inline-block;
    font-family: 微软雅黑;
    font-size: medium;
    width: 90%;
    left: 5%;
    padding-top: 8px;
		span{
	    display: inline;
	    font-size: medium;
	    font-weight: normal;
	    color: red;
		}
	}
	button{
		display: block;
    height: 35px;
    width: 90%;
    margin: 0px auto;
    margin-top: 10px;
    background-color: #5BC0DE;
    font-size: inherit;
    font-family: 微软雅黑;
    color: white;
    border-radius: 5px;
	}
	div{
		padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 10px;
    font-family: 微软雅黑;
    border: 1px solid lightblue;
    width: 90%;
    margin: auto;
    margin-top: 10px;
	  &[data-isshow="false"]{
	    display: none;
	  }	
	}
}

.iconloading{
		position:absolute;
    right: 0px;
    visibility: hidden;
    @extend .icon-loading;
}

@keyframes loading{
    0%   {transform: rotate(0deg);}
    100% {transform: rotate(360deg);}
}

.libinfo{
    @extend .noselect;
    text-align: center;
    margin-top: 5px;
    span.showtable{
    	color: #585B7A;
    	font-size: large;
   	}
	  &[data-isshow="false"]{
	    display: none;
	  }      	
   	div.table{
        &[data-isshow='false']{
			    display: none;
			  }
		    div{
		        display: inline-block;
		        border: 1.8px solid #e5e5e5;
		        border-radius: 4px;
		        font-size: 14px;
		        font-family: 微软雅黑;
		        margin-top: 10px;
		    }
		    table{
		        border-collapse: collapse;
		        color: #8A8A8A;
		        thead{
		            border-bottom: 1.8px solid #e5e5e5;
		            th{
		                padding: 6px 0;
		                &:first-child{
		                     border-right: 1px solid #e5e5e5;
		                }
		            }
		        }
		        tbody{
		            tr{
		                border-bottom: 1px solid #e5e5e5;
		                &[data-combind="true"]{
		                    border-bottom: none;
		                }
		                &:last-child{
		                    border: none;
		                }
		                td{
		                    text-align: center;
		                    padding: 8px 0;
		                    &:first-child{
		                        border-right: 1px solid #e5e5e5;
		                    }
		                    &:last-child{
		                        span{
		                            text-align: center;
		                            line-height: 1.6;
		                        }
		                    }
		                    & > span{
		                        display: inline-block;
		                        text-align: left;
		                    }
		                }
		            }
		        }
		    }   	
   	}
}

@include mqsmall('.libinfo div', (
    display: block
))
@include mqsmall('.libinfo table', (
    width: 100%
))

.bookbase{
    position: relative;
    margin: 15px 6px 0;
    white-space: nowrap;
    p{
        margin-bottom: 10px;
        color: #444;
        font-size: 15px;
        text-overflow: ellipsis;
        overflow: hidden;
    }
    small{
        display: block;
        margin-top: 4px;
        color: #737373;
        text-overflow: ellipsis;
        overflow: hidden;
        min-height: 16px;
    }
}

@include mqfromto( '.bookbase', '701px', '200px', (
    margin-top: 0,
    font-size: 18px
))
@include mqfromto( '.bookbase p', '701px', '200px', (
    font-size: 16px
))

.more{
    text-align: center;
    margin: 10px 0;
    button{
        background-color: #ebebeb;
        border: 1px solid #e1e1e1;
        border-radius: 3px;
        color: #505e69;
        cursor: pointer;
        width: 100px;
        padding: 6px 10px;
    }
}

@include mqfromto( '.more', '701px', '200px', (
    position: absolute,
    top: 0,
    left: 0,
    width: 100%,
    height: 100%,
    margin: 0,
    opacity: 0
))

@include mqfromto( '.more button', '701px', '200px', (
    margin-top: 0,
    width: 100%,
    height: 100%
))

.part{
    margin: 30px 0 30px 5px;
    background: #f9f9f9;
    box-shadow: 1px 2px 3px #ddd;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: center;
    position: relative;
    height: 38px;
    overflow: hidden;
    max-width: 700px;
    @extend .noselect;
    &[data-pdbefore="true"]{
        padding-left: 0;
    }
    &[data-pdafter="true"]{
        padding-right: 0;
    }
}

@include mq('.part', '700px', (
    margin-left: 0,
    padding: 0,
    max-width: 100%
))

.partNum{
    display: inline-block;
    padding: 10px 5px;
    cursor: pointer;
    color: #999;
    font-size: 16px;
    width: 10%;
    &[data-cur="false"]:hover, &[data-step]:hover{
        background-color: #4285f4;
        color: #fff;
    }
    &[data-cur="true"]{
        color: #4285f4;
        cursor: default;
    }
    &[data-step]{
        position: absolute;
        top: 0;
        background-color: rgb(66, 133, 244);
		    color: white;
		    font-family: 微软雅黑;
    }
    &[data-step="before"]{
		    left: 0;
		    width: 20%;
		    padding: 10px 0px;
   		  font-size: 14px;
		    border-radius: 3px 0 0 3px;
    }
    &[data-step="after"]{
		    right: 0;
		    width: 20%;
		    padding: 10px 0px;
   		  font-size: 14px;
		    border-radius: 3px 0 0 3px;
    }
}

@include mq('.partNum[data-cur="false"]', '700px', (
    display: inline-block
))
